<?php

require_once "core/application/models/mchangelogin/mchangelogin4.php";

class Mchangelogin5 extends Mchangelogin4 {

    private $_query;

    protected function setNewLoginInPlayers($newLogin) {
        /**
         *  устанавлиаем новый логин для чаров в гейм сервере
         * @param string $newLogin
         */
        DB::getInstance()->openConnectionToGS();
        $this->_query = "UPDATE `players` SET `account_name` = '$newLogin' WHERE `account_name` = '$_SESSION[name]'";
        return DB::getInstance()->sql($this->_query);
        DB::getInstance()->closeConnection();
        unset($this->_query);
    }

}

?>
